import java.lang.reflect.Array;
public class arrSort2 
{
	public static void main(String[] args) 
	{

		int a [] = {7, 3, 4, 765, 43, 67, 90, 1};
	
	
		{
		  int i, j, min;
		  
		  for (i = 0; i < (a.length)-1; i++)
		  {
		    min = i;
		    for (j = i+1; j < (a.length); j++)
		     {
		       if (a[j] < a[min])
		       {         
		          min = j;
		       }
		     }
		     int temp;
			 temp = a[i];
			 a[i] = a[min];
			 a[min]= temp;
		    
		  }
		}
		for (int i=0; i<a.length; i++)
		{
			System.out.println(a[i]);
		}

	}

}
